import request from "@/utils/request.ts";

import type {loginFormData,loginResponseData,userResponseData} from './type.ts'
enum API{
    LOGIN_URL="/admin/acl/index/login",
    USERINFO_URL="/admin/acl/index/info",
    LOGOUT_URL="/admin/acl/index/logout"
}
//暴漏请求函数
/**
 * 登录接口
 * @param data
 */
export const reqLogin = (data:loginFormData)=> request.post<any,loginResponseData>(API.LOGIN_URL,data)
/**
 * 获取用户信息接口
 */
export const reqUserInfo = ()=> request.get<any,userResponseData>(API.USERINFO_URL)

export const logout = ()=>request.post<any,any>(API.LOGOUT_URL)
